3.16 \(\int (a+b \sec ^2(e+f x))^2 \sin ^3(e+f x) \, dx\)

Optimal. Leaf size=72 \[ \frac{a^2 \cos ^3(e+f x)}{3 f}-\frac{a (a-2 b) \cos (e+f x)}{f}+\frac{b (2 a-b) \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]

[Out]

-((a*(a - 2*b)*Cos[e + f*x])/f) + (a^2*Cos[e + f*x]^3)/(3*f) + ((2*a - b)*b*Sec[e + f*x])/f + (b^2*Sec[e + f*x
]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.072152, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {4133, 448} \[ \frac{a^2 \cos ^3(e+f x)}{3 f}-\frac{a (a-2 b) \cos (e+f x)}{f}+\frac{b (2 a-b) \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x]^3,x]

[Out]

-((a*(a - 2*b)*Cos[e + f*x])/f) + (a^2*Cos[e + f*x]^3)/(3*f) + ((2*a - b)*b*Sec[e + f*x])/f + (b^2*Sec[e + f*x
]^3)/(3*f)

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^3(e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right ) \left (b+a x^2\right )^2}{x^4} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a (a-2 b)+\frac{b^2}{x^4}+\frac{(2 a-b) b}{x^2}-a^2 x^2\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{a (a-2 b) \cos (e+f x)}{f}+\frac{a^2 \cos ^3(e+f x)}{3 f}+\frac{(2 a-b) b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.464596, size = 83, normalized size = 1.15 \[ \frac{\sec ^3(e+f x) \left (-3 \left (11 a^2-64 a b+16 b^2\right ) \cos (2 (e+f x))+a^2 \cos (6 (e+f x))-26 a^2-6 a (a-4 b) \cos (4 (e+f x))+168 a b-16 b^2\right )}{96 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x]^3,x]

[Out]

((-26*a^2 + 168*a*b - 16*b^2 - 3*(11*a^2 - 64*a*b + 16*b^2)*Cos[2*(e + f*x)] - 6*a*(a - 4*b)*Cos[4*(e + f*x)]
+ a^2*Cos[6*(e + f*x)])*Sec[e + f*x]^3)/(96*f)

________________________________________________________________________________________

Maple [A]  time = 0.053, size = 125, normalized size = 1.7 \begin{align*}{\frac{1}{f} \left ( -{\frac{{a}^{2} \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}}+2\,ab \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{\cos \left ( fx+e \right ) }}+ \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) \right ) +{b}^{2} \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{3\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}-{\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{3\,\cos \left ( fx+e \right ) }}-{\frac{ \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x)

[Out]

1/f*(-1/3*a^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a*b*(sin(f*x+e)^4/cos(f*x+e)+(2+sin(f*x+e)^2)*cos(f*x+e))+b^2*(1/3
*sin(f*x+e)^4/cos(f*x+e)^3-1/3*sin(f*x+e)^4/cos(f*x+e)-1/3*(2+sin(f*x+e)^2)*cos(f*x+e)))

________________________________________________________________________________________

Maxima [A]  time = 1.01258, size = 90, normalized size = 1.25 \begin{align*} \frac{a^{2} \cos \left (f x + e\right )^{3} - 3 \,{\left (a^{2} - 2 \, a b\right )} \cos \left (f x + e\right ) + \frac{3 \,{\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x, algorithm="maxima")

[Out]

1/3*(a^2*cos(f*x + e)^3 - 3*(a^2 - 2*a*b)*cos(f*x + e) + (3*(2*a*b - b^2)*cos(f*x + e)^2 + b^2)/cos(f*x + e)^3
)/f

________________________________________________________________________________________

Fricas [A]  time = 0.496206, size = 158, normalized size = 2.19 \begin{align*} \frac{a^{2} \cos \left (f x + e\right )^{6} - 3 \,{\left (a^{2} - 2 \, a b\right )} \cos \left (f x + e\right )^{4} + 3 \,{\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x, algorithm="fricas")

[Out]

1/3*(a^2*cos(f*x + e)^6 - 3*(a^2 - 2*a*b)*cos(f*x + e)^4 + 3*(2*a*b - b^2)*cos(f*x + e)^2 + b^2)/(f*cos(f*x +
e)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)**2*sin(f*x+e)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.33672, size = 131, normalized size = 1.82 \begin{align*} \frac{6 \, a b \cos \left (f x + e\right )^{2} - 3 \, b^{2} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} + \frac{a^{2} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{11} \cos \left (f x + e\right ) + 6 \, a b f^{11} \cos \left (f x + e\right )}{3 \, f^{12}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x, algorithm="giac")

[Out]

1/3*(6*a*b*cos(f*x + e)^2 - 3*b^2*cos(f*x + e)^2 + b^2)/(f*cos(f*x + e)^3) + 1/3*(a^2*f^11*cos(f*x + e)^3 - 3*
a^2*f^11*cos(f*x + e) + 6*a*b*f^11*cos(f*x + e))/f^12